package com.easyfun.healthmagicbox.ormlite;

import java.util.ArrayList;

public enum DiseaseTypeEnum {
	
	
	GAOXUEYA (101,"高血压"), TANGNIAOBING (102,"糖尿病"), 
    GUANXINBING (201,"冠心病"), QIANLIEXIAN (202,"前列腺"),
    MANZHI (301,"慢性支气管炎"),
	OTHERS (999,"其他");
	
    // 
    private int nCode ;
    private String nName ;
    // 
    private DiseaseTypeEnum( int _nCode, String name) {
        this . nCode = _nCode;
        this.nName = name;
    }

    @Override
    public String toString() {
        return nName;
    }
    
    public Integer toInteger() {
        return nCode;
    }

	final static ArrayList<String> all = new ArrayList<String>();
    public static ArrayList<String> getAllDisease()
    {
    	if (all.size() == 0)
	    	for (DiseaseTypeEnum disease: DiseaseTypeEnum.values())
	    	{
	    		switch (disease)
	    		{
	    		case GAOXUEYA:
	    			all.add(GAOXUEYA.toString());
	    			break;
	    		case TANGNIAOBING:
	    			all.add(TANGNIAOBING.toString());
	    			break;
	    		case GUANXINBING:
	    			all.add(GUANXINBING.toString());
	    			break;
	    		case QIANLIEXIAN:
	    			all.add(QIANLIEXIAN.toString());
	    			break;
	    		case MANZHI:
	    			all.add(MANZHI.toString());
	    			break;
	    		case OTHERS:
	    			all.add(OTHERS.toString());
	    			break;
	    		default:
	    			all.add("Error");
	    		}
	    	}
    	return all;
    }
}
